package com.milo.java7.io.byter;

import org.junit.Test;

import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @author Milo Lee
 * @date 2021-04-14 15:56
 */
public class FileOutputStreamTest {

    @Test
    public void test1() throws IOException {

        FileOutputStream fout = new FileOutputStream("E:\\test2.txt");
        fout.write(1);
        fout.write(2);

        FileOutputStream foutr = new FileOutputStream("E:\\test2.txt");
        DataOutputStream doutr = new DataOutputStream(foutr);
        doutr.write(9);
        doutr.write(10);
    }
}
